<template>
	<ul :class="[[prefixCls+'-list'],size?[prefixCls+'-list--']+size:'',textoverflow?[prefixCls+'-list-text-overflow']:'',borderType]">
		<li v-for="item in data" :key="item.title">
			<span class="txt">
				<a v-if="item.url" :href="item.url" :target="item.target">{{ item.title }}</a>
				<template v-else>{{ item.title }}</template>
			</span>
			<span class="extra" v-if="item.time">{{item.time}}</span>
		</li>
	</ul>
</template>

<script>
import { prefixCls } from '../prefix'
import './list.css'

export default {
	name: `${prefixCls}List`,
	props:['data','size','textoverflow','border'],
	data() {
		return {
			prefixCls: prefixCls,
			borderType:this.border?(this.border=='false'?[prefixCls+'-list-no-border']:[prefixCls+'-list-border-']+this.border):''
		}
	},
}
</script>
